package model;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class Database {
	public static final String USER_NAME = "root";
	public static final String PASSWORD = "0906";
	public static final String HOST = "localhost";
	public static final String PORT = "3306";
	public static final String DATABASE_NAME = "storemanager";

	public static Connection connect() throws SQLException,
			ClassNotFoundException {
		String url = new StringBuilder("jdbc:mysql://").append(HOST)
				.append(":").append(PORT).append("/").append(DATABASE_NAME)
				.toString();
		Class.forName("com.mysql.jdbc.Driver");
		return DriverManager.getConnection(url, USER_NAME, PASSWORD);
	}
	
}
